/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilitarios;

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author Icaro
 */
public class Exceptions {

    public void Exceptions(String erro, String onde) {
        try {

            File arquivo = null;

            Date data = new Date();
            DateFormat t = new SimpleDateFormat("dd/MM/yyyy hh:mm");

            BufferedWriter out = new BufferedWriter(new FileWriter("C:/SerralheriaEloma/Log/Logs.txt", true));

            String texto = t.format(data) + " | Erro - " + erro + " | Local - " + onde;

            out.newLine();
            out.write(texto);
            out.close();

        } catch (Exception ee) {
            ee.printStackTrace();
        }

    }

}
